Skip to content

deprecate-auto-endpoint: deprecate ScaniiTarget.AUTO#112

Merged
rferreira merged 2 commits into
mainfrom
change/deprecate-auto-endpoint
May 5, 2026
Merged

deprecate-auto-endpoint: deprecate ScaniiTarget.AUTO#112
rferreira merged 2 commits into
mainfrom
change/deprecate-auto-endpoint

Conversation

@rferreira

Copy link
Copy Markdown
Contributor

Summary

  • ScaniiTarget.AUTO marked @Deprecated(since = "8.2.0") with javadoc pointing to US1, EU1, etc.
  • ScaniiClients.createDefault(String key, String secret) (no-target overload) marked @Deprecated(since = "8.2.0")
  • ScaniiClientBuilder.build() emits a System.err warning at runtime when no explicit target is set
  • Test classes annotated @SuppressWarnings("deprecation") to keep CI clean while still exercising the deprecated path
  • CHANGELOG updated with 8.2.0 section
  • pom.xml left at 1.0.0-SNAPSHOT per the Maven release plugin convention

Tracking

Part of uvasoftware/sdks#1 — reference SDK, locks deprecation annotation style for the 6 remaining fan-out SDKs.

🤖 Generated with Claude Code

Marks ScaniiTarget.AUTO and the no-target createDefault(key, secret)
overload as @deprecated(since="8.2.0"). Building a client without an
explicit .target() now emits a runtime System.err warning pointing to
the regional constants (US1, EU1, etc.) for data residency compliance.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
throw new IllegalStateException("credentials or authToken must be set");
}
if (target == ScaniiTarget.AUTO) {
System.err.println("[scanii] DEPRECATION: No explicit target set; defaulting to ScaniiTarget.AUTO " +

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't do this, it's too aggressive

Per review feedback, the annotation-only approach (@deprecated on
ScaniiTarget.AUTO and createDefault(key, secret)) is sufficient.
Runtime stderr noise is too aggressive for a library.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

@rferreira rferreira left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the runtime stderr warning from build() — annotation-only deprecation per review feedback. CHANGELOG updated to match.

@rferreira
rferreira merged commit 9ba6487 into main May 5, 2026
6 checks passed
@rferreira
rferreira deleted the change/deprecate-auto-endpoint branch May 5, 2026 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant